/**
 * 1. 数据模拟
 * */
var employees=Mock.mock({
    "list|9":[{
        "id|+1":1,// 逻辑主键
        "empNO":function () {
            return "emp"+"@string(2)";
        },
        "empName":"@cname",
        "img|1":["../../img/avatar3.jpg","../../img/avatar2.jpg"],
        "gender|1":["male","female"],// 英文-->中文 // |的作用
        "age":"@natural(19,60)",
        "dept":{
            "name|1":["人事部","财务部","开发部"],
            "dict_id|+1":15
        },
        "title|1":
            {   "title_id|+1":1000,
                "name|1":["职员","组长","经理"]
            }
    }],
})

var responseMsg =Mock.mock({
    "message":"success",
    "flag":true
})

/**
 * 2.ajax拦截
 * */
Mock.mock("http://test.org/employees","get",employees.list);
Mock.mock("http://test.org/employee/save","get",responseMsg)